package IO流;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Properties;

public class Prorerties集合文件操作 {
    public static void main(String[] args) throws IOException {
        Properties p1 = new Properties();
        p1.setProperty("minnie", "小颗粒");
        p1.setProperty("宋雨琦", "美女");
        p1.store(new FileOutputStream("file文件夹\\p.properties"), "这是一个测试文件");
        Properties p2 = new Properties();
        p2.load(new FileInputStream("file文件夹\\p.properties"));
        System.out.println(p2);
    }
}
